#include<iostream>

using namespace std;

#define ORI 6
#define NEW 10

int randOri(){
	return rand() % ORI + 1;
}

int randNew(){
	int row, col, idx;
	int edge = ((ORI * ORI) / NEW ) * NEW; 
	do {
		row = randOri();
		col = randOri();
		idx = col + (row - 1) * ORI;
	} while(idx > edge );
	return 1 + (idx - 1) % NEW;
}

int randXtoY(){
	int times = 1000000;
	int i = 0,re = -1;
	int stats[NEW] = {0,};

	for (i = 0; i < times; i++){
		re = randNew();
		stats[re - 1]++;
	}

	for (i = 0; i < NEW; i++){
		cout <<stats[i] <<endl;
	}
	cout <<endl;
	cin.get();
	cin.get();
	return 0;
}
